package com.ggk911.pharmacy_system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.jeffreyning.mybatisplus.anno.InsertFill;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 入库信息
 *
 * @author ggk-911
 * @version 1.0 2023/4/11 9:47
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("put_in_storage")
public class PutInStorage implements Serializable {
    @TableId(value = "put_in_storage_id", type = IdType.AUTO)
    private Integer putInStorageId;

    private Integer purchaseId;

    private Integer userId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date putInStorageTime;

    @TableField(exist = false)
    private Purchase purchase;

    @TableField(exist = false)
    private User user;
}
